#ifndef ALARMMANAGER_H
#define ALARMMANAGER_H

#include "AlarmEvent.h"
#include <QObject>
#include <QSettings>

class AlarmManager : public QObject {
    Q_OBJECT
public:
    explicit AlarmManager(QObject *parent = nullptr);
    void loadAlarms();
    void saveAlarms();
    QVector<AlarmEvent> getActiveAlarms();

    void addEventAlarm(const AlarmEvent &event);

signals:
    void alarmTriggered(const AlarmEvent &event);

    void startFlashing();
    void stopFlashing();


public slots:
    void checkAlarms();

private:

    QSettings settings;
public:
    QList<AlarmEvent> alarms;


};

#endif // ALARMMANAGER_H
